Skip to content

Allow using external Postgres and existing Secrets#111

Open
adrianAzoitei wants to merge 2 commits into
thingsboard:masterfrom
adrianAzoitei:support-existing-db-secret
Open

Allow using external Postgres and existing Secrets#111
adrianAzoitei wants to merge 2 commits into
thingsboard:masterfrom
adrianAzoitei:support-existing-db-secret

Conversation

@adrianAzoitei
Copy link
Copy Markdown

@adrianAzoitei adrianAzoitei commented Dec 8, 2023

Why was this needed

Support for an external PostgreSQL instance is implicit, but confusing to configure. Users still have to deploy the postgresql-ha subchart and just use a serviceName pointing to an external PostgreSQL.
Specifying credentials is done via values.yaml or --set at the command line, which could be insecure, depending on who else has access to the server. Using existing Secrets is a pretty common pattern for this.

What was implemented

  • allow disabling postgresql-ha
  • add keys and templates for rendering credentials and connection details for external PostgreSQL
  • reuse existing secret approach for Cassandra as used in subchart

How it was tested

Ran helm template with the following overriding values:

cassandra:
  enabled: true
  dbUser:
  #   user: setplease
  #   password: setplease
    existingSecret: test-cassandra-secret

postgresql-ha:
  enabled: false

externalPostgres:
  host: localhost
  port: 5432
  database: thingsboard
  # existingSecret:
  #   name: test-postgres-secret
  #   username: username
  #   password: password

- allow disabling postgresql-ha
- add keys and templates for rendering credentials and connection details for external PostgreSQL
- reuse existing secret approach for Cassandra as used in subchart
- name: postgresql-ha
version: 8.5.2
repository: https://charts.bitnami.com/bitnami
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These versions are no longer available on https://charts.bitnami.com/bitnami.

@adrianAzoitei
Copy link
Copy Markdown
Author

I committed charts/ by mistake, will remove them.

@adrianAzoitei
Copy link
Copy Markdown
Author

@pon0marev

@adrianAzoitei
Copy link
Copy Markdown
Author

I committed charts/ by mistake, will remove them.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant